package com.moss.system.service.impl.sample;

import com.moss.common.constant.Constants;
import com.moss.common.entity.SysSampleDeliverEntity;
import com.moss.common.entity.SysSampleEntity;
import com.moss.system.mapper.SampleDeliverMapper;
import com.moss.system.mapper.SampleMapper;
import com.moss.system.service.SampleBranchService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SampleDeliverServiceImpl implements SampleBranchService {

    @Resource
    SampleMapper sampleMapper;

    @Resource
    SampleDeliverMapper sampleDeliverMapper;


    @Override
    public void saveSample(SysSampleEntity sample) {
        System.out.println("送检");
    }

    @Override
    public String type() {
        return Constants.DELIVER_SAMPLE;
    }


    @Override
    public SysSampleEntity getDetail(String sampleId) {
        SysSampleEntity sample = sampleMapper.selectById(sampleId);
        SysSampleDeliverEntity deliver = sampleDeliverMapper.selectById(sampleId);
        sample.setDeliver(deliver);
        return sample;
    }
}
